//判断cook是否登录
function ck(key){
    var ckl=document.cookie
    console.log(ckl)
    var arr=ckl.split('; ')
    for(var i=0;i<arr.length;i++){
        var zhong1=arr[i].split('=')
        if(zhong1[0]==key){
             var deng1=document.getElementById('deng1')
             deng1.innerHTML="欢迎"+zhong1[1]
        }
    }
}
ck('name')
function lun1(){
	var som=0
	dsq1=setInterval(()=>{
	som++
	if(som>4){
		$('.toulun').css('top',-35)
		som=2
	}
	$('.toulun').animate({top:-som*35},500)
},2000)
}
lun1()

var dao1=document.querySelector('.daobox')
window.onscroll=function(){
	let gun1=window.pageYOffset
	
	if(gun1>100){
		dao1.style.position='fixed'
		dao1.style.borderBottom='3px solid #000'
		dao1.style.zIndex='5'
	}else{
		dao1.style.position=''
		dao1.style.border=''
		dao1.style.zIndex=''
	}
}
//鼠标移入事件
var boy1=document.body
var $xian1=$('.shou12_yi>:nth-child(2)')
var yi1=document.querySelector('.shou12>:nth-child(1)')
var yi2=document.querySelector('.shou12>:nth-child(2)')
yi1.onmousemove=function(){
	$('.shou12_yi>:nth-child(1)').css({display:'block',zIndex:8})
}
yi1.onmouseout=function(){
	$('.shou12_yi>:nth-child(1)').css({display:'none'})
}

// 移入2
yi2.onmousemove=function(){
	$('.shou12_yi>:nth-child(2)').css({display:'block'})
}
yi2.onmouseout=function(){

		$('.shou12_yi>:nth-child(2)').css({display:'none'})

}
var yi22=document.querySelector('.shou12_yi>:nth-child(2)')
yi22.onmouseenter=function(){
	yi22.style.display='block'
}
yi22.onmouseleave=function(){
	yi22.style.display='none'
}